package net.hn.hnms.sys.system.controller.feign;

import net.hn.hnms.sys.system.api.domain.SysLogininfor;
import net.hn.hnms.sys.system.api.domain.SysOperLog;
import net.hn.hnms.sys.system.remote.RemoteLogServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * Author: PanSX
 * Date: 2022/7/12 17:09
 */
@ApiIgnore
@RestController
@RequestMapping("/remoteLog")
public class RemoteLogController {
    @Autowired
    RemoteLogServiceImpl remoteLogService;
    /**
     * 保存系统日志
     *
     * @param sysOperLog 日志实体
     * @return 结果
     */
    @PostMapping(value = "/saveLog")
//    @SaCheckLogin
    public boolean saveLog(@RequestBody SysOperLog sysOperLog) {
        return remoteLogService.saveLog(sysOperLog);
    }
    /**
     * 保存访问记录
     *
     * @param sysLogininfor 访问实体
     * @return 结果
     */
    @PostMapping(value = "/saveLogininfor")
//    @SaCheckLogin
    boolean saveLogininfor(@RequestBody SysLogininfor sysLogininfor) {
     return     remoteLogService.saveLogininfor(sysLogininfor);
    }
}
